package com.biz.primus.app.erpbridge.feign;

import com.biz.primus.app.erpbridge.vo.oms.request.DepotOrderOperationRequest;
import com.biz.primus.model.oms.vo.OmsOrderReturnVo;
import com.biz.primus.model.oms.vo.OmsOrderVo;
import com.biz.primus.model.oms.vo.OrderQueryVo;
import com.biz.primus.model.oms.vo.OrderReturnQueryVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author yanweijin
 * @date 2017/11/25
 */
@FeignClient(qualifier = "omsFeignClient",name="service-oms"/*, fallback = DegradedOmsFeignClient.class*/)
public interface OmsFeignClient {



	@GetMapping("soa/omsErpApi/findOrders")
	List<OmsOrderVo> findOrders(OrderQueryVo query);

	@GetMapping("soa/omsErpApi/findReturns")
	List<OmsOrderReturnVo> findReturns(OrderReturnQueryVo query);

	@GetMapping("soa/omsErpApi/orderDetail")
	OmsOrderVo orderDetail(@RequestParam("depotCode") String depotCode, @RequestParam("code") String orderCode);

	@GetMapping("soa/omsErpApi/returnDetail")
	OmsOrderReturnVo returnDetail(@RequestParam("depotCode") String depotCode, @RequestParam("code") String orderCode);

	@PostMapping("soa/omsErpApi/printOrder")
	void printOrder(@RequestBody DepotOrderOperationRequest req);

	@PostMapping("soa/omsErpApi/outbound")
	void outbound(@RequestBody DepotOrderOperationRequest req);




}
